package com.wyz.demo01;

public class Proxy implements Rent{
    Host host = new Host();
    public Proxy() {
    }

    public Proxy(Host host) {
        this.host = host;
    }

    public Host getHost() {
        return host;
    }

    public void setHost(Host host) {
        this.host = host;
    }

    //中介所作的事情
    public void rent(){
        seeHouse();
        heTong();
        fail();
        host.rent();
    }
    //中介带你看房
    public void seeHouse(){
        System.out.println("中介带你看房");
    }
    //签合同
    public void heTong(){
        System.out.println("中介签合同");
    }
    //收取中介费
    public void fail(){
        System.out.println("收取中介费用");
    }
}
